package com.atmc.controller;

import com.atmc.bean.Code;
import com.atmc.service.CodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class CodeController {
    @Autowired
    CodeService codeService;
    //查询一条账号记录
    @RequestMapping("/code/selectOne")
    public String selectOne(@RequestParam("acco_name")String acco_name, Model model){
        Code list = codeService.selectOne(acco_name);
        model.addAttribute("msg",list);
        return "code/account";
    }
    //去添加账号页面
    @RequestMapping("/toaddpage")
    public String toaddpage(){
        return "code/accountadd";
    }
}
